<template>
    <!-- 修改资料 -->

    <div>
        <el-form label-width="100px" :model="form" label-position="right" ref="formRef" :rules="formRules" disabled
            class="borderNone">
            <el-row>
                <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
                    <el-form-item label="代码" prop="name">
                        <el-input v-model="form.name"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
                    <el-form-item label="名称" prop="name">
                        <el-input v-model="form.name"></el-input>
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
                    <el-form-item label="类别" prop="codeKindName">
                        <el-input v-model="form.codeKindName"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
                    <el-form-item label="资源文件代码">
                        <el-input v-model="form.resourceFileNo"></el-input>
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
                    <el-form-item label="开始值" prop="startValue">
                        <el-input v-model="form.startValue"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
                    <el-form-item label="结束值" prop="endValue">
                        <el-input v-model="form.endValue"></el-input>
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
                    <el-form-item label="自定义1" prop="customer1">
                        <el-input v-model="form.customer1"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
                    <el-form-item label="自定义2" prop="customer2">
                        <el-input v-model="form.customer2"></el-input>
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
                    <el-form-item label="自定义3" prop="customer3">
                        <el-input v-model="form.customer3"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
                    <el-form-item label="自定义4" prop="customer4">
                        <el-input v-model="form.customer4"></el-input>
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
                    <el-form-item label="自定义5" prop="customer5">
                        <el-input v-model="form.customer5"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
                    <el-form-item label="自定义6" prop="customer6">
                        <el-input v-model="form.customer6"></el-input>
                    </el-form-item>
                </el-col>
            </el-row>
            <el-row>
                <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
                    <el-form-item label="自定义7" prop="customer7">
                        <el-input v-model="form.customer7"></el-input>
                    </el-form-item>
                </el-col>
                <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
                    <el-form-item label="自定义8" prop="customer8">
                        <el-input v-model="form.customer8"></el-input>
                    </el-form-item>
                </el-col>
            </el-row>
            <el-form-item label="状态" prop="status">
                <el-switch v-model="form.status" size="large" inline-prompt :active-icon="Check" :inactive-icon="Close"
                    active-value="normal" inactive-value="disable" />
            </el-form-item>
            <el-form-item label="备注">
                <el-input v-model="form.remark" type="textarea"></el-input>
            </el-form-item>

        </el-form>
        <div class="button-position">
            <el-button @click="updateVisible" type="primary">退 出</el-button>
        </div>
    </div>
</template>


<script setup>
import { ref, onMounted } from 'vue';
import { Check, Close } from '@element-plus/icons-vue';
import Api from '@/api/model/system'
const emit = defineEmits(['updatetable'])

const props = defineProps({
    paramsData: {
        type: Object,
        defalut: {}
    }
})



onMounted(() => {
    getData();
})
// 查看用户数据的对象
const form = ref({});

const updateVisible = (val) => {
    emit('updatetable')
}

//调取数据
const getData = async () => {
    let res = await Api.syscode.detail.post(props.paramsData);
    console.log(res);
    if (res.code == 200) {
        form.value = res.data;
    } else {
        form.value = '';
    }

}


</script>

<style lang="less" scoped>
.borderNone {
    :deep(.el-input__wrapper) {
        box-shadow: 0 0 0 0px var(--el-input-border-color, var(--el-border-color)) inset;
        cursor: default;
        background-color: transparent; //背景颜色透明
        border-bottom: 1px solid #999;
        border-radius: 0;

        .el-input__inner {
            cursor: default !important;
        }
    }
}
</style>

